/**
 * 
 */
package com.rostami.tutorial.spring.propertiesHolder;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Alireza
 *
 */
public class PropertyPlaceHolder {
	private String message;

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
	public void printMessage(){
		System.out.println(message);
	}
	
	public static void main(String [] args){
		try{
			@SuppressWarnings("resource")
			ApplicationContext context = new ClassPathXmlApplicationContext("SpringConfig.xml");
			
			PropertyPlaceHolder obj = (PropertyPlaceHolder) context.getBean("propertyPlaceHolderBean");

			obj.printMessage();
		}catch(Exception e){
			e.printStackTrace();
		}
	}

}
